import java.io.DataInputStream;
import java.io.FileInputStream;

/*
    DataInputStream：数据字节输入流
    DataOutputStream写的文件，只能用DataInputStream去读，并且读的时候需要提前知道写入的顺序
    读的顺序和写的顺序一致

 */
public class DataInputStreamTest {
    public static void main(String[] args) throws Exception{
        DataInputStream dis = new DataInputStream(new FileInputStream("chapter21//data"));

        byte b = dis.readByte();
        int i = dis.readInt();
        char c = dis.readChar();

        System.out.println(b);
        System.out.println(i);
        System.out.println(c);

        dis.close();
    }
}

//强宝是猪^(*￣(oo)￣)^
